package com.yupi.springbootinit.service;

import com.yupi.springbootinit.model.dto.chart.GenChartByAiRequest;
import com.yupi.springbootinit.model.entity.Chart;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.springbootinit.model.vo.BiResponse;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

/**
* @author Lenovo
* @description 针对表【chart(图表信息表)】的数据库操作Service
* @createDate 2023-08-12 14:42:06
*/
public interface ChartService extends IService<Chart> {


    /**
     *  AI 生成图表
     * @param multipartFile
     * @param genChartByAiRequest
     * @param request
     * @return
     */
    BiResponse genChartByAi (@RequestPart("file") MultipartFile multipartFile,
                             GenChartByAiRequest genChartByAiRequest, HttpServletRequest request);


    /**
     * 将游戏表中的数据，插入到chart表中，包含了（chartdata、chart type、goal）
     * @param other
     * @return
     */
    String otherToChart(String other);


}
